@echo off
for /f "tokens=1,2,3 delims=/ " %%a in ('DATE /T') do set date=%%c-%%b-%%a

net use V: \\192.168.1.246\C$ /user:localhost\administrator abc*123

set Backup_File_Path="V:\Backup_Redmine\Attach_File_"
set Redmine_Attached_Path="C:\Projects\Redmine\apps\redmine\files"

set winrar_exe_file="C:\Program Files\WinRAR\rar.exe"
set mysqldump_exe_file="C:\Projects\Redmine\mysql\bin\mysqldump.exe"

%mysqldump_exe_file% -u bitnami --password=dbccfaffe6 bitnami_redmine > %Backup_File_Path%\database_%date%.sql

echo "Beginning Compress Redmine Attach File"

%winrar_exe_file% a -agyyyy-MM-dd %Backup_File_Path% -rr524288 -r %Redmine_Attached_Path%


